<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="../../../vue.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- v-model本质上是v-bind和v-on的结合 -->
      <input type="text " v-model="str" />

      <br />
      <input
        type="text"
        v-bind:value="str"
        v-on:input="str=$event.target.value"
      />
    </div>

    <script>
      const vm = new Vue({
        el: '#app',
        data() {
          return {
            str: 'ccc',
          };
        },
      });
    </script>
  </body>
</html>
